<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'Login.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<title>登录</title>  
    <link rel="stylesheet" href="css/pintuer.css">
    <link rel="stylesheet" href="css/admin.css">
    <script src="js/jquery.js"></script>
    <script src="js/pintuer.js"></script>
 <script type="text/javascript">
function  changeImg(){
     var objImg=document.getElementById("yzm");
     objImg.src="/checkcode/create.do?ran="+Math.random()
 }

   </script>
  </head>
  
  <body>
  <div class="bg"></div>
<div class="container">
    <div class="line bouncein">
        <div class="xs6 xm4 xs3-move xm4-move">
            <div style="height:150px;"></div>
            <div class="media media-y margin-big-bottom">           
            </div>         
            <form action="/admin/login.do" method="post">
            <div class="panel loginbox">
                <div class="text-center margin-big padding-big-top"><h1>炫酷小视频网站后台管理</h1></div>
                <div class="panel-body" style="padding:30px; padding-bottom:10px; padding-top:10px;">
                    <div class="form-group">
                        <div class="field field-icon-right">
                            <input type="text" name="account" class="input input-big" id="name" name="name" placeholder="登录账号" data-validate="required:请填写账号" />
                            <span class="icon icon-user margin-small"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="field field-icon-right">
                            <input type="password" name="password" class="input input-big" id="password" name="password" placeholder="登录密码" data-validate="required:请填写密码" />
                            <span class="icon icon-key margin-small"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="field">
                         <input type="text" name="checkcode" class="input input-big" name="code" placeholder="填写右侧的验证码" data-validate="required:请填写右侧的验证码" />
                        <img src="/checkcode/create.do" alt="" width="100" height="32" class="passcode" style="height:43px;cursor:pointer;" id="yzm" onclick="changeImg()">  
                                                   
                        </div>
                    </div>
                </div>
                <div style="padding:30px;"><input type="submit" class="button button-block bg-main text-big input-big" value="登录"></div>
            </div>
            </form>          
        </div>
    </div>
</div>
  <script type="text/javascript">
  $("#name").mouseout(function(){
	if(!(/^[0-9]+$/.test($('#name').val()))){
	     
		alert("账号只由数字组成！！！！！");
		 $("#name").val(null);	
	}
	
  });
  $("#password").mouseout(function(){
		if(!(/^[0-9]+$/.test($('#password').val()))){
		
			alert("密码只由数字组成！！！！！");
			 $("#password").val(null);		
		}		
  });
	   
  </script>
  </body>
</html>
